import { getUserList, delUser, getRoles, addUser, updateUser, changeStatus } from '@/services/UsersList'

export default () => {
  const GetUserList = (params: any) => {
    return getUserList(params)
  }

  const DelUser = (data: any) => {
    return delUser(data)
  }

  // 获取角色列表
  const GetRoles = (params: any) => {
    return getRoles(params)
  }

  // 新增用户
  const AddUser = (data: any) => {
    return addUser(data)
  }

  // 编辑用户
  const UpdateUser = (data: any) => {
    return updateUser(data)
  }

  // 启用和禁用
  const ChangeStatus = (data: any) => {
    return changeStatus(data)
  }

  return {
    GetUserList,
    DelUser,
    GetRoles,
    AddUser,
    UpdateUser,
    ChangeStatus
  }
}
